package com.prs.crm.service.online.Impl;

import java.util.ArrayList;
import java.util.Collection;

import com.prs.crm.dao.online.ForumContentDao;
import com.prs.crm.domain.online.ForumContent;
import com.prs.crm.domain.online.ForumManager;
import com.prs.crm.service.impl.BaseServiceImpl;
import com.prs.crm.service.online.ForumContentService;

public class ForumContentServiceImpl extends BaseServiceImpl<ForumContent, ForumContentDao>implements ForumContentService{

	@Override
	public Collection<ForumManager> convertToForumManager(String ids) {
		try{
			Collection<ForumManager> forumManagers=new ArrayList<ForumManager>();
			for (String id : ids.split(",")) {
				ForumManager forumManager=new ForumManager();
				forumManager.setId(Integer.parseInt(id));
				forumManagers.add(forumManager);
			}
			return forumManagers;
		}catch (NumberFormatException e) {
			e.printStackTrace();
			return null;
			}
	}

}
